package com.dfdchem.imd.kaiwu.activity;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.dfdchem.imd.kaiwu.activity.base.BaseActivity;
import com.dfdchem.imd.kaiwu.util.Log;

public class LoginRequiredBroadcast extends BroadcastReceiver {
    private final static String TAG = "LoginRequiredBroadcast";
    public final static String NAME = "LOGIN_REQUIRED";

    @Override
    public void onReceive(Context context, Intent intent) {
        Log.d(TAG, "onReceive context:" + context + " intent:" + intent.getData());
        if (context instanceof BaseActivity) {
            ((BaseActivity) context).finish();
        }
    }
}
